<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
ReaderWriter (jersey-bundle 1.9 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="ReaderWriter (jersey-bundle 1.9 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ReaderWriter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../com/sun/jersey/core/util/MultivaluedMapImpl.html" title="class in com.sun.jersey.core.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../com/sun/jersey/core/util/StringIgnoreCaseKeyComparator.html" title="class in com.sun.jersey.core.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?com/sun/jersey/core/util/ReaderWriter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ReaderWriter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sun.jersey.core.util</FONT>
<BR>
Class ReaderWriter</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.jersey.core.util.ReaderWriter</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>ReaderWriter</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
A utility class for reading and writing using byte and character streams.
 <p>
 If a byte or character array is utilized then the size of the array
 is by default the value of <A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#DEFAULT_BUFFER_SIZE"><CODE>DEFAULT_BUFFER_SIZE</CODE></A>. This value can
 be set using the system property <A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#BUFFER_SIZE_SYSTEM_PROPERTY"><CODE>BUFFER_SIZE_SYSTEM_PROPERTY</CODE></A>.
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>Paul.Sandoz@Sun.Com</DD>
</DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#BUFFER_SIZE">BUFFER_SIZE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The buffer size for arrays of byte and character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#BUFFER_SIZE_SYSTEM_PROPERTY">BUFFER_SIZE_SYSTEM_PROPERTY</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The system property to set the default buffer size for arrays
 of byte and character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#DEFAULT_BUFFER_SIZE">DEFAULT_BUFFER_SIZE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default buffer size for arrays of byte and character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.nio.charset.Charset</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#UTF8">UTF8</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The UTF-8 Charset.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#ReaderWriter()">ReaderWriter</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.nio.charset.Charset</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#getCharset(javax.ws.rs.core.MediaType)">getCharset</A></B>(<A HREF="../../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</A>&nbsp;m)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the character set from a media type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#readFromAsString(java.io.InputStream, javax.ws.rs.core.MediaType)">readFromAsString</A></B>(java.io.InputStream&nbsp;in,
                 <A HREF="../../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the bytes of an input stream and convert to a string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#readFromAsString(java.io.Reader)">readFromAsString</A></B>(java.io.Reader&nbsp;reader)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the characters of a reader and convert to a string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#writeTo(java.io.InputStream, java.io.OutputStream)">writeTo</A></B>(java.io.InputStream&nbsp;in,
        java.io.OutputStream&nbsp;out)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read bytes from an input stream and write them to an output stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#writeTo(java.io.Reader, java.io.Writer)">writeTo</A></B>(java.io.Reader&nbsp;in,
        java.io.Writer&nbsp;out)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read characters from an input stream and write them to an output stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#writeToAsString(java.lang.String, java.io.OutputStream, javax.ws.rs.core.MediaType)">writeToAsString</A></B>(java.lang.String&nbsp;s,
                java.io.OutputStream&nbsp;out,
                <A HREF="../../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</A>&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert a string to bytes and write those bytes to an output stream.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="UTF8"><!-- --></A><H3>
UTF8</H3>
<PRE>
public static final java.nio.charset.Charset <B>UTF8</B></PRE>
<DL>
<DD>The UTF-8 Charset.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="BUFFER_SIZE_SYSTEM_PROPERTY"><!-- --></A><H3>
BUFFER_SIZE_SYSTEM_PROPERTY</H3>
<PRE>
public static final java.lang.String <B>BUFFER_SIZE_SYSTEM_PROPERTY</B></PRE>
<DL>
<DD>The system property to set the default buffer size for arrays
 of byte and character.
 <p>
 If the property value is not a positive integer then the default buffer
 size declared by <A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#DEFAULT_BUFFER_SIZE"><CODE>DEFAULT_BUFFER_SIZE</CODE></A> will be utilized.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#com.sun.jersey.core.util.ReaderWriter.BUFFER_SIZE_SYSTEM_PROPERTY">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="DEFAULT_BUFFER_SIZE"><!-- --></A><H3>
DEFAULT_BUFFER_SIZE</H3>
<PRE>
public static final int <B>DEFAULT_BUFFER_SIZE</B></PRE>
<DL>
<DD>The default buffer size for arrays of byte and character.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#com.sun.jersey.core.util.ReaderWriter.DEFAULT_BUFFER_SIZE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="BUFFER_SIZE"><!-- --></A><H3>
BUFFER_SIZE</H3>
<PRE>
public static final int <B>BUFFER_SIZE</B></PRE>
<DL>
<DD>The buffer size for arrays of byte and character.
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="ReaderWriter()"><!-- --></A><H3>
ReaderWriter</H3>
<PRE>
public <B>ReaderWriter</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="writeTo(java.io.InputStream, java.io.OutputStream)"><!-- --></A><H3>
writeTo</H3>
<PRE>
public static final void <B>writeTo</B>(java.io.InputStream&nbsp;in,
                                 java.io.OutputStream&nbsp;out)
                          throws java.io.IOException</PRE>
<DL>
<DD>Read bytes from an input stream and write them to an output stream.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the input stream to read from.<DD><CODE>out</CODE> - the output stream to write to.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if there is an error reading or writing bytes.</DL>
</DD>
</DL>
<HR>

<A NAME="writeTo(java.io.Reader, java.io.Writer)"><!-- --></A><H3>
writeTo</H3>
<PRE>
public static final void <B>writeTo</B>(java.io.Reader&nbsp;in,
                                 java.io.Writer&nbsp;out)
                          throws java.io.IOException</PRE>
<DL>
<DD>Read characters from an input stream and write them to an output stream.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the reader to read from.<DD><CODE>out</CODE> - the writer to write to.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if there is an error reading or writing characters.</DL>
</DD>
</DL>
<HR>

<A NAME="getCharset(javax.ws.rs.core.MediaType)"><!-- --></A><H3>
getCharset</H3>
<PRE>
public static final java.nio.charset.Charset <B>getCharset</B>(<A HREF="../../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</A>&nbsp;m)</PRE>
<DL>
<DD>Get the character set from a media type.
 <p>
 The character set is obtained from the media type parameter "charset".
 If the parameter is not present the <A HREF="../../../../../com/sun/jersey/core/util/ReaderWriter.html#UTF8"><CODE>UTF8</CODE></A> charset is utilized.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>m</CODE> - the media type.
<DT><B>Returns:</B><DD>the character set.</DL>
</DD>
</DL>
<HR>

<A NAME="readFromAsString(java.io.InputStream, javax.ws.rs.core.MediaType)"><!-- --></A><H3>
readFromAsString</H3>
<PRE>
public static final java.lang.String <B>readFromAsString</B>(java.io.InputStream&nbsp;in,
                                                      <A HREF="../../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</A>&nbsp;type)
                                               throws java.io.IOException</PRE>
<DL>
<DD>Read the bytes of an input stream and convert to a string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the input stream to read from.<DD><CODE>type</CODE> - the media type that determines the character set defining
        how to decode bytes to charaters.
<DT><B>Returns:</B><DD>the string.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if there is an error reading from the input stream.</DL>
</DD>
</DL>
<HR>

<A NAME="readFromAsString(java.io.Reader)"><!-- --></A><H3>
readFromAsString</H3>
<PRE>
public static final java.lang.String <B>readFromAsString</B>(java.io.Reader&nbsp;reader)
                                               throws java.io.IOException</PRE>
<DL>
<DD>Read the characters of a reader and convert to a string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - the reader
<DT><B>Returns:</B><DD>the string
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if there is an error reading from the reader.</DL>
</DD>
</DL>
<HR>

<A NAME="writeToAsString(java.lang.String, java.io.OutputStream, javax.ws.rs.core.MediaType)"><!-- --></A><H3>
writeToAsString</H3>
<PRE>
public static final void <B>writeToAsString</B>(java.lang.String&nbsp;s,
                                         java.io.OutputStream&nbsp;out,
                                         <A HREF="../../../../../javax/ws/rs/core/MediaType.html" title="class in javax.ws.rs.core">MediaType</A>&nbsp;type)
                                  throws java.io.IOException</PRE>
<DL>
<DD>Convert a string to bytes and write those bytes to an output stream.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the string to convert to bytes.<DD><CODE>out</CODE> - the output stream to write to.<DD><CODE>type</CODE> - the media type that determines the character set defining
        how to decode bytes to characters.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ReaderWriter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../com/sun/jersey/core/util/MultivaluedMapImpl.html" title="class in com.sun.jersey.core.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../com/sun/jersey/core/util/StringIgnoreCaseKeyComparator.html" title="class in com.sun.jersey.core.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?com/sun/jersey/core/util/ReaderWriter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ReaderWriter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2011 <a href="http://www.oracle.com/">Oracle Corporation</a>. All Rights Reserved.
</BODY>
</HTML>
